package com.itheima;

import com.itheima.domain.User;
import com.itheima.service.UserService;
import com.itheima.spring.SpringApplicationContext;

public class App {
    public static void main(String[] args) {
        //加载核心配置文件
        SpringApplicationContext sac = new SpringApplicationContext("beans.xml");
        //获取接口实现类对象
        UserService userService = (UserService) sac.getBean("userService");
        //调用方法
        User user = userService.findUser();
        System.out.println("user = " + user);
    }
}
